#ifndef NNZ_ALLEGRO_WINDOW_H
#define NNZ_ALLEGRO_WINDOW_H

#include "allegro.h"
#include "alfont.h"
class CAllegroWindow
{
public:
	CAllegroWindow(void);
	CAllegroWindow(CAllegroWindow const&);

	virtual void SetText(const char* text);
	virtual void SetRect(int x1, int y1, int x2, int y2);
	virtual void Move(int px, int py);
	virtual void Draw(ALLEGRO_BITMAP* sb);
	virtual void SetFont(ALLEGRO_FONT* font);
	virtual bool ContainsText();
	virtual void SetBG(const char* filename);

	bool isInside(int px,int py);

	virtual void DestroyWindow();

	virtual ~CAllegroWindow(void);
protected:
	void DeleteText();
	ALLEGRO_FONT* m_font;
	int m_x1,m_y1,m_x2,m_y2;
	char* m_text;
	ALLEGRO_BITMAP* m_wb;
	ALLEGRO_BITMAP* m_background;

	virtual void RedrawBuffer();
};

#endif